function terminal_main(tab)
{
  var userInfo = getUserInfo(tab.id);

  debug("-----------------\n");
  debug("Opening terminal:");
  debug(" Machine name: "+userInfo.machineName);
  debug(" User name: "+userInfo.username);
  debug(" Password Length: "+userInfo.password.length);
  debug("-----------------\n");
}

function getUserInfo(tabId)
{
  return getBackgroundPage().getUserDataForTab(tabId); 
}
